package com.day4;

import java.util.Scanner;

public class Day4zuoye2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = {9,5,2,7,7};
        System.out.println("请您输入要查找的数:");
        int num=sc.nextInt();
        int n=-1;
        for (int i = 0; i <arr.length ; i++) {
            if (arr[i]==num){
                n++;
                System.out.println("第一个引索为:"+i);
                break;
            }
        }
        if (n==-1){
            System.out.println(n);
        }

    }
}
